:root {
    --gradient-begin: #023;
    --gradient-end: #000;
    --text-color: #089;
    --form-element-background: #000;
    --table-sort-field-background: #033;
    --progress-bar-color: #0d0;
    --hover-color: #0aa;
    --border-color: #044;
}

@media (prefers-color-scheme: light) {
    :root {
        --gradient-begin: white;
        --gradient-end: silver;
        --text-color: black;
        --form-element-background: #FFF;
        --table-sort-field-background: #EFF;
        --progress-bar-color: #151;
    }
}

html {
    height: 99%;
}

body {
    font-family: monospace;
    margin: 2px;
    padding: 0;
    height: 100%;
}

* {
    color: var(--text-color);
}

body, #colorscheme-panel {
    background: #023;
    background: linear-gradient(var(--gradient-begin), var(--gradient-end));
    background-repeat: no-repeat;
    background-attachment: fixed;
}

form#config label {
    display: inline-block;
    width: 300px;
    margin-right: 20px;
    margin-bottom: 30px;
    text-align: right;
    vertical-align: top;
}

form#config em {
    display: inline-block;
    vertical-align: top;
    width: 300px;
    margin-left: 10px;
    margin-bottom: 20px;
}

form#config input,
form#config textarea {
    vertical-align: top;
    border: 1px solid var(--border-color);
    background-color: var(--form-element-background);
}

form#config select {
    margin-bottom: 10px;
    background-color: var(--form-element-background);
    width: 280px;
}

table.data_table {
    border-collapse: collapse;
    border-spacing: 0;
    margin: auto;
    margin-top: 5px;
}

table.data_table tr {
    cursor: pointer;
}

table.data_table th,
table.data_table td {
   border: 1px solid var(--border-color);
   margin: 0;
   padding: 3px;
}

table.data_table th.data_table-sort,
table.data_table th:hover {
    background-color: var(--table-sort-field-background);
}

table.data_table tbody > tr:hover {
    background-color: var(--table-sort-field-background);
}

table.data_table td.breakable-text {
    word-break: break-all;
}

table.data_table td > a {
    display: block;
    text-decoration: none;
}

#init-report {
    position: absolute;
    left: 50%;
}

#init-report > div {
    position: relative;
    left: -50%;
    top: 200px;
    border: solid 1px var(--border-color);
    background-color: var(--gradient-end);
    width: 400px;
    height: 200px;
    padding: 10px;
    vertical-align: center;
    text-align: center;
}

#init-report div.progress {
    display: none;
    width: 100%;
    height: 20px;
    border: solid 1px var(--border-color);
    padding: 1px;
}

#init-report div.progress > div {
    height: 100%;
    background-color: var(--progress-bar-color);
}

#overview,
#timeline {
    cursor: -webkit-grab;
    cursor:-moz-grab;
}

#overview:active,
#timeline:active {
    cursor: -webkit-grabbing;
    cursor:-moz-grabbing;
}

.widget {
    border: solid 1px #022;
}

.widget:hover {
    border: solid 1px var(--hover-color);
}

.visualization {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

#metric-selector select {
    background-color: var(--form-element-background);
}

#colorscheme-panel {
    display: none;
    position: absolute;
    top: 24px;
    width: 350px;
    padding: 6px;
}

#colorscheme-panel ol {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

#colorscheme-panel hr {
    border-color: #089;
}

#colorscheme-panel button, #colorscheme-panel input, #colorscheme-panel textarea, #search-container input {
    font-family: monospace;
    font-size: 12px;
    background-color: var(--form-element-background);
    border: 1px solid #0898;
}

#colorscheme-panel .category {
    margin: 10px 0 0;
}

#colorscheme-panel input[name="label"] {
    width: 181px;
}

#colorscheme-panel textarea[name="patterns"] {
    width: calc(100% - 6px);
}

#colorscheme-panel .jscolor {
    width: 45px;
    height: 15px;
}

#category-legend {
    display: none;
}
#search-container {
    border: none;
    text-align: left;
    height: 26px;
    z-index: 100;
    position: relative;
}
#search-container input {
    border: none;
    width: calc(100% - 5px);
    height: 100%;
}
#search-container button {
    cursor: pointer;
    width: 30px;
    margin: 0;
    background: #089;
}
#search-container > * {
    min-height: 20px;
}
#search_query_button_clear {
    color: black;
    font-weight: bold;
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
}
#flatprofile table {
    border-collapse: collapse;
    border-spacing: 0;
    margin: 0;
}

#flatprofile table th,
#flatprofile table td {
   border: 1px solid var(--border-color);
   margin: 0;
   padding-left: 2px;
   padding-right: 2px;
}

#flatprofile table th.sortable {
    cursor: pointer;
}

#flatprofile table th.sort,
#flatprofile table th.sortable:hover {
    background-color: var(--table-sort-field-background);
}

#flatprofile table td {
    text-align: right;
}
